package com.example.anpuser.tempTestMQ;


import com.example.anpapi.entity.dto.usermodel.User.User;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import org.springframework.web.bind.annotation.RestController;

@RestController
public class mqProvider {

    @Autowired
    RocketMQTemplate template;
    @GetMapping("/send/{message}")
    public String send(@PathVariable("message") String message){
        User user = new User();
        template.sendOneWay("test-topic",message);
        return "success";
    }

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }
}
